home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
pdcurs21.zip
/
PORTABLE.ZIP
/
BEEP.C
< prev
next >
Wrap
Text File
|
1992-11-21
|
2KB
|
50 lines
#define CURSES_LIBRARY 1
#include <curses.h>
#undef beep
#ifndef NDEBUG
char *rcsid_beep = "$Header: c:/curses/portable/RCS/beep.c%v 2.0 1992/11/15 03:29:34 MH Rel $";
#endif
/*man-start*********************************************************************
beep() - generate audio-visual alarm.
X/Open Description:
This routine is used to signal the terminal user. The beep()
function will sound the audible bell on the terminal, if possible
and if not, will flash the screen (visible bell), if possible.
The flash() function will flash the screen, and if that is not
possible, will sound the audible signal. If neither signal is
possible, nothing will happen. Nearly all terminals have an
audible signal (bell or beep), but only some can flash the screen.
X/Open Return Value:
The beep() and flash() functions return OK on success and ERR on
error.
X/Open Errors:
No errors are defined for this function.
Portability:
PDCurses int beep( void );
X/Open Dec '88 int beep( void );
BSD Curses int beep( void );
SYS V Curses int beep( void );
**man-end**********************************************************************/
int beep(void)
{
if (!_cursvar.audible)
{
flash();
return( ERR ); /* We try to flash instead...*/
}
PDC_putctty( '\007', 0 );
return( OK );
}